package work.cqhx.springapi.mapper;

import org.apache.ibatis.annotations.Mapper;
import work.cqhx.springapi.pojo.Student;

import java.util.List;

@Mapper
public interface StudentMapper {
    //查询所有Student数据
    List<Student> queryStudentAll();
    //查询所有Student数据并按升序返回
    public List<Student> queryStudentAsc();
    //查询所有Student数据并按降序返回
    public List<Student> queryStudentDesc();
    //求总分数最高的学生
    public Student queryStudentMax();
    //求总分数最低的学生
    public Student queryStudentMin();
    //查询学生总数
    public Integer queryStudentCount();
    //语文合格的人数
    public Integer queryChineseQualifiedCount();
    //数学合格人数
    public Integer queryMathQualifiedCount();
    //英语合格人数
    public Integer queryEnglishQualifiedCount();
    //新增学生
    public Boolean addStudent(Student student);
    //删除学生
    public Boolean deleteStudent(Integer id);
    //修改学生
    public Boolean updateStudent(Student student);

    public List<String> queryClassesAll();

    public Integer queryClassesAverage(String classes);

    public List<Student> conditionalQueriesStudent(String classes, String name);

    public Boolean deleteStudentBatch(List<Integer> ids);

}
